<?php

namespace Home\Controller;

class VersionController extends BaseMallController {

    function _initialize() {
        parent::_initialize();
        $this->_Member_mod = M("Member");
        $this-> user_id = session('visitor.user_id');
    }

    function index() {
        if(!$_POST['type']){
            render('10004','参数错误');
        }
        $cond['type'] = $_POST['type'];
        $res = M('version')->where($cond)->find();
        render('10000','获取成功',array('version' => $res));
    }

}